package com.biz.primus.management.commodity.feign;

import com.biz.primus.commodity.vo.ExtendDetailVo;
import com.biz.primus.commodity.vo.ExtendQueryVo;
import com.biz.primus.commodity.vo.ExtendVo;
import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.management.commodity.degraded.DegradedExtendFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 扩展属性Feign Client
 *
 * @author david-liu
 */
@FeignClient(name = "service-commodity", fallback = DegradedExtendFeignClient.class)
public interface ExtendFeignClient {

    @PostMapping("soa/extendService/findAll")
     SpringPageVO<ExtendDetailVo> findAll(@RequestBody ExtendQueryVo reqVo);

    @PostMapping("soa/extendService/create")
    void create(@RequestBody ExtendVo extendVo);

    @PostMapping("soa/extendService/update")
    void update(@RequestParam("extendId") String extendId, @RequestBody ExtendVo extendVo);

    @GetMapping("soa/extendService/findExtendById")
    ExtendDetailVo findExtendById(@RequestParam("extendId") Long extendId);

}
